import * as types from '../constants/ActionTypes';

const initialState = {
  stageObj: 0,
  userIdStore: '',
};

const UserStageReducer = (state = initialState, action) => {
  switch (action.type) {
    case types.USER_STAGE_CHANGE:
      return ({ ...state,
        ...{
          stageObj: action.stageObj,
          userIdStore: action.userIdStore,
        } });
    default:
      return state;
  }
};

export default UserStageReducer;
